<?php 
require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once("Modules/MX23DF2S/modconf.php"); 
MYTCONN();
form_pr('exc_report1','','','post'); ?>
<div class="title">Controlo de Saldo de Compra e Venda</div>
<div class="Line" style="padding:6px">
	<label style="">Periodo: De </label>
	<?php echo mn_field('date','ED','rp_DateStart',date("Y-m-01"),'exc_report1','8','','');?>
	<label style=""> a </label>
	<?php echo mn_field('date','ED','rp_DateEnd','','exc_report1','8','',''); ?>
	<label style="">Moeda: </label>
	<?php 
	$qr_Currency = "SELECT miso_Cod_Elite AS ID, miso_ID AS NAME FROM hd_monedasiso WHERE miso_Cod_Elite > 1";
	mn_field('select','ED','rp_Currency','',$qr_Currency,'','',''); ?>
	<label style=""> x </label>
	<?php echo mn_field('hselect','ED','rp_Currency2',1,"EUR#1",'','','');?>
	<label style="">Tipo Operacao: </label>
	<?php
	mn_field('hselect','ED','ExcType','',"Todas;Compra;Venda#;1;2",'','',''); ?>
	<label style="">Loja: </label>
	<?php
	mn_field('select','ED','ExcOrigen0','',"SELECT OriNumero AS ID, OriNombre AS NAME 
			FROM origenes WHERE OriActivo = 1 AND OriTipo = 2",' ','',''); ?>
	<?php
	mn_field('button','ED','rp_Submit','Consultar','','8','','" style="margin:8px;padding:5px;height:24px" onclick="
		document.exc_report1.action=\'_response/call.php?get=Exchange/Lib/rs_report1.php\';
		subform(\'exc_report1\',\'rp_result\');');
	mn_field('button','ED','rp_Print','Imprimir','','8','','" style="margin:8px;padding:5px;height:24px" onclick="
		printdiv(\'rp_result\');'); ?>
</div>
</form>
<div id="rp_result"></div>